<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/tlds/mongoosehome-common.tld" prefix="mgh" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>无标题文档</title>
    </head>

    <body>
        <div class="pageContent">	      
            <form method="post" action="productList!updateImagesSubmit.htm" class="pageForm required-validate" onsubmit="return validateCallback(this, deleteProductPicCallbak);">             	    
                <div class="pageFormContent" layoutH="56">
	                <input name="tabid" type="hidden" value="${tabid}"/>
               		<input name="tProducts.productId" value="${p.productId}"  type="hidden"/>
                    <input id="photoTurn" name="tProducts.photoTurn" value=""  type="hidden"/>	          
                	<p>
                       	<label>商品名称：</label>
                       	<input name="tProducts.productName" value="${p.productName}" readonly="readonly" type="text" size="30" />
                	</p>
                	<p>
                		<label>商品价格：</label>
                     	<input name="444" value="${p.price}" readonly="readonly" type="text" size="30" />
                	</p>
                    <div class="piclist">
                    	<ul>
                        	<li>
                    	<span>封面图片</span>
                    	<img src="${imagePath}${p.photo}" width="200px" height="200px"></img>                        
                        	</li>
                        </ul>
                    </div>
                    <div class="piclist">                   
                    <ul>
                    <c:forTokens items="${p.photoTurn}" delims="," var="pt">
                        <li>
                            <span>${pt}</span>
                            <span>
                            <img src="${imagePath}${pt}" width="200px" height="200px"></img>                        
                            </span>
                            <a class="delete" href="productList!deleteTurnImages.htm?picid=${pt}&pid=${p.productId}&tabid=${tabid}" callback="deleteProductPicCallbak" target="ajaxTodo"  title="确定要删除吗?"><span>删除</span></a>&nbsp;&nbsp;&nbsp;<a class="delete" href="productList!resetCoverImage.htm?picid=${pt}&pid=${p.productId}&tabid=${tabid}" callback="deleteProductPicCallbak" target="ajaxTodo"  title="确定要设置${pt}为封面图片吗?"><span>设为封面图片</span></a>
                        </li>
                    </c:forTokens>                      
                    </ul>
                    </div>
                    <div style="float:left; margin:10px">
                        <div id="fileQueueUpdate" class="fileQueue"></div>
                        <input id="testFileInput" type="file" name="image" 
                               uploader="/dwz/uploadify/scripts/uploadify.swf"
                               cancelImg="/dwz/uploadify/cancel.png" 
                               script="/upload.htm" 
                               scriptData="{pid:${p.productId}}"
                               fileQueue="fileQueueUpdate"
                               onAllComplete="uploadifyAllComplete" 
                               fileExt="*.jpg;*.jpeg;*.gif;*.png;"
                               fileDesc="*.jpg;*.jpeg;*.gif;*.png;" 
                               fileDataName ="File"
                               onComplete="onCompleteFileUpload"
                               />
                    </div>
                </div>
                <div class="formBar">
                    <ul>
                        <!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
                        <li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
                        <li>
                            <div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
                        </li>
                    </ul>
                </div>
            </form>
        </div>       
    </body>
</html>